import { AxiosPromise } from 'axios'
import request from '/@/utils/request'
const prefix = '/api/dms/product/'

// 新增
export const getProductList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })

// 筛选项[品牌、条码、编码...]
export const getProductSearch: () => AxiosPromise = () =>
  request(`${prefix}search`)

  // 筛选项
export const getProductSearchSelect: (data:object) => AxiosPromise = (data) =>
  request(`${prefix}searchSelect`, { data })

//详情
export const getProductInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })

// 删除图片
export const productDeleteImg: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}deleteImg`, { data })
//产品更新

export const productUpdate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}update`, { data })

// 价目表
export const productPriceList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}priceList`, { data })

// 价目表导入
export const productImport: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}import`, { data })


// 价目表更新
export const productUpdatePrice: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}updatePrice`, { data })

// 价目表更新
export const productSearchClass: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}searchClass`, { data })

  // 税率
export const productTaxRate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}taxRate`, { data })


  // 客户可售产品列表
export const productCustomerProduct: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}customerProduct`, { data })
  // 客户可售产品筛选项
export const productCustomerProductSearch: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}customerProductSearch`, { data })

  // 对应关系列表
export const productCustomerOrgList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}productCustomerOrgList`, { data })

  // 导入对应关系
export const importProductCustomerOrg: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}importProductCustomerOrg`, { data })

  // 销售组织筛选
export const productCustomerOrgSearch: () => AxiosPromise = () =>
  request(`${prefix}productCustomerOrgSearch`)

  // 客户可售产品明细
export const customerProductList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}customerProductList`, { data })
